/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.gov.mtc.dgac.licencias.bean;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author externo.gamaro
 */
@Embeddable
public class ClienteoperadorPK implements Serializable {
    @Column(name = "COD_CLIENTE", nullable = false)
    private long codCliente;
    @Column(name = "COD_OPERADOR", nullable = false)
    private long codOperador;

    public ClienteoperadorPK() {
    }

    public ClienteoperadorPK(long codCliente, long codOperador) {
        this.codCliente = codCliente;
        this.codOperador = codOperador;
    }

    public long getCodCliente() {
        return codCliente;
    }

    public void setCodCliente(long codCliente) {
        this.codCliente = codCliente;
    }

    public long getCodOperador() {
        return codOperador;
    }

    public void setCodOperador(long codOperador) {
        this.codOperador = codOperador;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codCliente;
        hash += (int) codOperador;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClienteoperadorPK)) {
            return false;
        }
        ClienteoperadorPK other = (ClienteoperadorPK) object;
        if (this.codCliente != other.codCliente) {
            return false;
        }
        if (this.codOperador != other.codOperador) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dgac.licencias.to.ClienteoperadorPK[codCliente=" + codCliente + ", codOperador=" + codOperador + "]";
    }

}
